package com.taoym.voucher.common.enums;

import lombok.Getter;

/**
 * @coder taoym
 * @datetime 2021/6/4 17:12
 * @desc 图片信息类型枚举
 */
@Getter
public enum ImageInfoTypeEnum implements EnumsCommon {

    POSTER(1, "海报"),
    DEVELOPER(2, "开发者"),
    MINI_CODE(3, "小程序码");

    private final Integer code;
    private final String msg;

    ImageInfoTypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsg(Integer code) {
        for (ImageInfoTypeEnum imageInfoTypeEnum : values()) {
            if (code.equals(imageInfoTypeEnum.code)) {
                return imageInfoTypeEnum.msg;
            }
        }
        return null;
    }
}
